Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Pixmap Draw Contexts

A pixmap draw context is a draw context associated with a pixmap, that is, a region of memory not directly associated with a window. The two-dimensional image produced by the renderer is simply written into that memory region.

See the chapter "Geometric Objects" for information on the structure of pixmaps.

To draw an image into an offscreen graphics world (pointed to by a variable of type GWorldPtr ), for instance, you need to (1) create the offscreen graphics world using standard QuickDraw routines, (2) call LockPixels to lock the pixels in memory, and (3) create a pixmap draw context in which the address of the pixmap is the pointer returned by the GetPixBaseAddr function. You need to lock the pixmap in memory because QuickDraw 3D routines may move or purge memory.

See the book Inside Macintosh: Imaging With QuickDraw for complete information about offscreen graphics worlds.

You can update a window without rendering to it by rendering to an offscreen graphics world and then copying the data to the window.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |